﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PProtocolo
{
    public class TramaBIN
    {
        public Protocolo.Tipo Header;
        public int Comando { get; set; }
        public int Largo { get; set; }
        public byte[] Buffer { get; set; }

        public TramaBIN(Protocolo.Tipo tipo, int Comando, int Largo, byte[] Buffer){
            this.Header=tipo;
            this.Comando=Comando;
            this.Largo=Largo;
            this.Buffer=Buffer;
        }

        public TramaBIN(){
            this.Header = Protocolo.Tipo.REQ;
            this.Comando = 0;
            this.Largo = 0;
            this.Buffer = new byte[9999];
        }

        public TramaBIN(int BufferSize)
        {
            this.Header = Protocolo.Tipo.REQ;
            this.Comando = 0;
            this.Largo = 0;
            this.Buffer = new byte[BufferSize];
        }

        
    }
}
